<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统设置 - 智能制造分析系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
    <script src="https://cdn.jsdelivr.net/npm/echarts@5.4.3/dist/echarts.min.js"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: { DEFAULT: '#1890ff' },
                        success: { DEFAULT: '#52c41a' },
                        warning: { DEFAULT: '#faad14' },
                        error: { DEFAULT: '#f5222d' }
                    }
                }
            }
        }
    </script>
    <style>
        .ant-layout { min-height: 100vh; }
        .ant-layout-sider { background: #001529; }
        .ant-menu { background: transparent; }
        .ant-menu-item { color: rgba(255,255,255,0.65); }
        .ant-menu-item:hover { color: #fff; }
        .ant-menu-item-selected { color: #fff; background: #1890ff; }
        .ant-card { border-radius: 2px; border: 1px solid #f0f0f0; }
        .ant-card-head { border-bottom: 1px solid #f0f0f0; padding: 16px 24px; }
        .ant-table { border-radius: 2px; }
        .ant-table-thead > tr > th { background: #fafafa; font-weight: 500; }
        .ant-btn { border-radius: 2px; box-shadow: 0 2px 0 rgba(0,0,0,0.015); }
        .ant-alert { border-radius: 2px; }
    </style>
</head>
<body class="bg-[#f0f2f5]">
<div class="ant-layout">
    <!-- 侧边栏 -->
    <aside class="fixed inset-y-0 left-0 w-64 bg-[#001529] text-white">
        <div class="flex flex-col h-full">
            <div class="flex items-center justify-center h-16 border-b border-white/10">
                <i class="fas fa-industry text-primary-400 text-2xl"></i>
                <span class="ml-2 text-xl font-medium">智能制造分析</span>
            </div>
            <nav class="flex-1 px-4 py-4 space-y-1">
                <a href="dashboard.html" class="flex items-center px-4 py-2 text-white/65 hover:text-white hover:bg-white/10 rounded">
                    <i class="fas fa-chart-line w-5 h-5"></i>
                    <span class="ml-3">生产监控</span>
                </a>
                <a href="yield_analysis.html" class="flex items-center px-4 py-2 text-white/65 hover:text-white hover:bg-white/10 rounded">
                    <i class="fas fa-chart-pie w-5 h-5"></i>
                    <span class="ml-3">良率分析</span>
                </a>
                <a href="equipment_maintenance.html" class="flex items-center px-4 py-2 text-white/65 hover:text-white hover:bg-white/10 rounded">
                    <i class="fas fa-tools w-5 h-5"></i>
                    <span class="ml-3">设备维护</span>
                </a>
                <a href="data_source.html" class="flex items-center px-4 py-2 text-white/65 hover:text-white hover:bg-white/10 rounded">
                    <i class="fas fa-database w-5 h-5"></i>
                    <span class="ml-3">数据源配置</span>
                </a>
                <a href="system_settings.html" class="flex items-center px-4 py-2 text-white bg-primary-500 rounded">
                    <i class="fas fa-cog w-5 h-5"></i>
                    <span class="ml-3">系统设置</span>
                </a>
            </nav>
        </div>
    </aside>
    <!-- 主内容区 -->
    <main class="ml-64 p-8">
        <div class="flex justify-between items-center mb-8">
            <h1 class="text-2xl font-medium text-gray-900">系统设置</h1>
            <div class="flex items-center space-x-4">
                <button class="inline-flex items-center px-4 py-2 border border-transparent rounded shadow-sm text-sm font-medium text-white bg-primary-500 hover:bg-primary-600">
                    <i class="fas fa-save mr-2"></i> 保存设置
                </button>
            </div>
        </div>
        <!-- 系统参数配置 -->
        <div class="bg-white rounded border border-gray-200 shadow-sm mb-8">
            <div class="px-6 py-4 border-b border-gray-200">
                <h3 class="text-lg font-medium text-gray-900">系统参数配置</h3>
            </div>
            <div class="p-6">
                <form class="space-y-6">
                    <div>
                        <label class="block text-sm font-medium text-gray-700">系统名称</label>
                        <input type="text" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500" value="智能制造分析系统" />
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700">系统版本</label>
                        <input type="text" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500" value="v1.0.0" />
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700">数据刷新频率（分钟）</label>
                        <input type="number" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500" value="5" />
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700">日志保留天数</label>
                        <input type="number" class="mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-primary-500 focus:border-primary-500" value="30" />
                    </div>
                </form>
            </div>
        </div>
        <!-- 用户管理 -->
        <div class="bg-white rounded border border-gray-200 shadow-sm mb-8">
            <div class="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
                <h3 class="text-lg font-medium text-gray-900">用户管理</h3>
                <button class="inline-flex items-center px-3 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50">
                    <i class="fas fa-plus mr-2"></i> 添加用户
                </button>
            </div>
            <div class="p-6 overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead>
                        <tr>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">用户名</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">角色</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">最后登录时间</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">admin</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">管理员</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-success-50 text-success-600">启用</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20 16:45</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <button class="text-primary-500 hover:text-primary-600 mr-2"><i class="fas fa-edit mr-1"></i>编辑</button>
                                <button class="text-error-500 hover:text-error-600"><i class="fas fa-trash mr-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">user1</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">普通用户</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-success-50 text-success-600">启用</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20 15:30</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <button class="text-primary-500 hover:text-primary-600 mr-2"><i class="fas fa-edit mr-1"></i>编辑</button>
                                <button class="text-error-500 hover:text-error-600"><i class="fas fa-trash mr-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">user2</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">普通用户</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-error-50 text-error-600">禁用</span>
                            </td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-19 10:15</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <button class="text-primary-500 hover:text-primary-600 mr-2"><i class="fas fa-edit mr-1"></i>编辑</button>
                                <button class="text-error-500 hover:text-error-600"><i class="fas fa-trash mr-1"></i>删除</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!-- 角色权限 -->
        <div class="bg-white rounded border border-gray-200 shadow-sm mb-8">
            <div class="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
                <h3 class="text-lg font-medium text-gray-900">角色权限</h3>
                <button class="inline-flex items-center px-3 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50">
                    <i class="fas fa-plus mr-2"></i> 添加角色
                </button>
            </div>
            <div class="p-6 overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead>
                        <tr>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">角色名称</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">描述</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">用户数</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">管理员</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">系统管理员，拥有所有权限</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">1</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <button class="text-primary-500 hover:text-primary-600 mr-2"><i class="fas fa-edit mr-1"></i>编辑</button>
                                <button class="text-error-500 hover:text-error-600"><i class="fas fa-trash mr-1"></i>删除</button>
                            </td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">普通用户</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">普通用户，拥有基本操作权限</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
                                <button class="text-primary-500 hover:text-primary-600 mr-2"><i class="fas fa-edit mr-1"></i>编辑</button>
                                <button class="text-error-500 hover:text-error-600"><i class="fas fa-trash mr-1"></i>删除</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <!-- 日志查看 -->
        <div class="bg-white rounded border border-gray-200 shadow-sm">
            <div class="px-6 py-4 border-b border-gray-200 flex items-center justify-between">
                <h3 class="text-lg font-medium text-gray-900">日志查看</h3>
                <button class="inline-flex items-center px-3 py-1.5 border border-gray-300 shadow-sm text-sm font-medium rounded text-gray-700 bg-white hover:bg-gray-50">
                    <i class="fas fa-sync-alt mr-2"></i> 刷新
                </button>
            </div>
            <div class="p-6 overflow-x-auto">
                <table class="min-w-full divide-y divide-gray-200">
                    <thead>
                        <tr>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">时间</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">用户</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">操作</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">IP地址</th>
                            <th class="px-6 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">状态</th>
                        </tr>
                    </thead>
                    <tbody class="bg-white divide-y divide-gray-200">
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20 16:45</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">admin</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">登录系统</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.100</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-success-50 text-success-600">成功</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20 15:30</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">user1</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">修改系统参数</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.101</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-success-50 text-success-600">成功</span>
                            </td>
                        </tr>
                        <tr>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2024-03-20 14:15</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">user2</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">登录系统</td>
                            <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">192.168.1.102</td>
                            <td class="px-6 py-4 whitespace-nowrap">
                                <span class="px-2 inline-flex text-xs leading-5 font-medium rounded-full bg-error-50 text-error-600">失败</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </main>
</div>
</body>
</html> 